package td.Global {
	import td.data.UserData;
	import td.Global.GlobalUser;
	public class updata {
		private static var _instance:updata;	
		
		//用户基本数据
		internal var _userData:UserData;
		
		public function updata(singleton:SingletonGlobalUpdate) {
			
		}
		
		/**
		 * 用户基本数据
		 */
		public function set userData(value:UserData):void 
		{
			_userData = value;
		}
		
		/**
		 * 钱更新	(当前的)
		 * @param	value	
		 */
		public function updateMoney(value:Number):void {	
			if (GlobalUser.userData.nUMoney == value || value < 0)				
				return;
				
			GlobalUser.userData.nUMoney = value;
		}
		
		public function updataUserHP(value:Number):void {
			if (GlobalUser.userData.nUHP == value || value < 0)				
				return;
				
			GlobalUser.userData.nUHP = value;
		}
		
		
		public function updateLevel(value:int):void {
			
		}
		
		
		
		
		
		public static function getInstance():updata {
			return _instance ||= new updata(new SingletonGlobalUpdate());
		}
	}
}
class SingletonGlobalUpdate { };